<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>
    <div id='info'></div>
    <script>
        var info = '<h1>hello{{uname}}</h1>';
        var name = '张山';
        var result = info.replace('{{uname}}', name);
        var info = document.getElementById('info');
        info.innerHTML = result;
    </script>
</body>

</html>